@import "./init";

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  display: flex;

  .nav {
    position: relative;
    height: 100%;
    flex: 0 0 200px;
    width: 200px;
    background: #eee;
    border-right: 1px solid #999;

    .nav-item {
      height: 40px;
      line-height: 40px;
      padding-left: 10px;
      background: #fff;
      font-size: 14px;
      font-weight: 500;
      cursor: default;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;

      & > p {
        cursor: inherit;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      & + .nav-item {
        border-top: 1px solid #999;
      }

      &.click, &:hover {
        color: #fff;
        background: #09c;
      }
    }

    .create {
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      box-sizing: border-box;
      border-bottom: 0;
      font-size: 16px;
      height: 40px;
      line-height: 40px;
      background: #ffffff;
      padding-left: 10px;
      color: #333;
      cursor: default;

      & > img {
        width: 20px;
        height: 20px;
        vertical-align: sub;
        margin-right: 10px;
      }
    }
  }

  .content {
    height: 100%;
    flex: 1;

    .edit-wrap {
      position: relative;
      width: 100%;
      height: 100%;
      padding-top: 34px;
      box-sizing: border-box;

      .edit-title {
        display: flex;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        background: #f1f1f1;

        .fun-bar {
          flex: 1;
          text-align: right;

          .fun-btn {
            display: inline-block;
            width: 30px;
            height: 30px;
            margin-right: 10px;

            .fun {
              display: block;
            }

            .ing {
              display: none;
            }

            &:hover {
              .fun {
                display: none;
              }

              .ing {
                display: block;
              }
            }
          }
        }
      }

      .edit-content {
        width: 100%;
        height: 100%;
        background: #fefefe;
      }
    }
  }

  .msg-window {
    display: none;
    width: 200px;
    height: 40px;
    padding-top: 10px;
    position: absolute;
    right: 20px;
    bottom: 20px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    z-index: 99999;

    .thread-progressbar {
      position: relative;
      width: 180px;
      height: calc(1.4142 * 10px);
      background: repeating-linear-gradient(45deg, #390, #390 5px, transparent 5px, transparent 9px, #390 10px) 0 0 content-box;
      animation: twill 1s linear infinite;
      border-radius: 10px;
      overflow: hidden;
      margin: 0 auto;

      &::after {
        position: absolute;
        width: 100%;
        height: 100%;
        background-image: linear-gradient(rgba(#000, .5), rgba(#fff, .5), rgba(#000, .5));
        content: "";
      }
    }

    .msg-content {
      text-align: center;
      font-size: 14px;
      color: rgba(0, 0, 0, 0.4);
    }
  }
}


@keyframes twill {
  from {
    background-position-y: 0;
  }
  to {
    background-position-y: calc(-1 * 1.4142 * 20px);
  }
}
